package analyze;

/*
 * will be sorted by this value
 * key: if this where a hashmap, key
 * intValue: if this were a hashmap, value
 * desc: if this were a hashmap, value
 * 
 * They will be printed like this:
 * i.getKey() + ": " + i.getValue()+"\n"
 * 
 */
public class AnalyzeInfo {
	private int order;
	private String key;
	private double doubleValue;
	private String stringValue;
	private boolean usedInt;
	public AnalyzeInfo(int order, String key, double value){
		this.order = order;
		this.key = key;
		this.doubleValue = value;
		this.usedInt = true;
	}
	public AnalyzeInfo(int order, String key, String desc){
		this.order = order;
		this.key = key;
		this.stringValue = desc;
		this.usedInt = false;
	}
//	public AnalyzeInfo(int order, String key, int value, String desc){
//		this.order = order;
//		this.key = key;
//		this.intValue = value;
//		this.desc = desc;
//	}
	
	
	public int getOrder() {
		return order;
	}
	public void setOrder(int order) {
		this.order = order;
	}
	
	public String getKey() {
		return key;
	}
	public void setKey(String key) {
		this.key = key;
	}
	
//	public int getIntValue() {
//		return intValue;
//	}
//	public void setIntValue(int value) {
//		this.intValue = value;
//	}
//
//	public String getDesc() {
//		return desc;
//	}
//
//	public void setDesc(String desc) {
//		this.desc = desc;
//	}
	public Object getValue(){
		if(usedInt)
			return new Double(doubleValue);
		return stringValue;
	}
}
